<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
</head>
<body>
    <script src="../static/js/jquery-1.11.0.min.js"></script>
    <script>
        function param2Obj(url) {
            const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
            if (!search) {
                return {}
            }
            const obj = {}
            const searchArr = search.split('&')
            searchArr.forEach(v => {
                const index = v.indexOf('=')
                if (index !== -1) {
                    const name = v.substring(0, index)
                    const val = v.substring(index + 1, v.length)
                    obj[name] = val
                }
            })
            return obj
        }
        $(document).ready(function () {
			console.log(1);
            let obj = param2Obj(window.location.href)
            $.ajax({
                type: 'GET',
                url:"https://marketingservice.ediblefungus.cn/weixin/getURLLink?Path=pages/shopCart/submitOrder-postcard&Gift_Card_SerialNumber="+obj.Gift_Card_SerialNumber+"&interval=1",
                data: {},
                success: function (Result) {
                    window.location.href = Result.data;
					console.log(Result);
                },
                dataType: "json"
            });
        });
    </script>
</body>

</html>